home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / xmasspak / vector / vector5.asm < prev    next >
Encoding:
Assembly Source File  |  1995-04-14  |  15.6 KB  |  810 lines

  1. ;
  2. ;  Line-Vector-routine v2.2
  3. ;
  4. ;  done 1995 by Capella/Escape
  5. ;  this routine is only for Escape-usage .... DON'T SPREAD!!!!
  6. ;
  7.  
  8. ideal
  9. model large
  10. p386n
  11. stack 256
  12.  
  13. assume cs:coding
  14.  
  15. points = 14               ; Anzahl Punkte
  16. areas = 36              ; Anzahl Linien
  17.  
  18. ;-------------------------------------
  19. macro  setcol   backcol
  20.  
  21.        mov dx,03c8h
  22.        xor al,al
  23.        out dx,al
  24.        inc dx
  25.        mov al,backcol
  26.        out dx,al
  27.        out dx,al
  28.        out dx,al
  29.  
  30. endm
  31. ;-------------------------------
  32. macro  setpage newpage
  33.  
  34.        mov dx,03d4h
  35.        mov ax,newpage
  36.        out dx,ax
  37.  
  38. endm
  39. ;-------------------------------
  40.  
  41. segment  coding
  42.  
  43. start:     mov ax,data1
  44.            mov ds,ax
  45.            assume ds:data1
  46.  
  47.            mov ax,0a000h
  48.            mov es,ax
  49.            assume es:0a000h
  50.  
  51.           ; call set320400
  52.             call set640400
  53.  
  54.            mov ax,0a800h
  55.            mov es,ax
  56.            assume es:0a800h
  57.            
  58. main:      call  rotate_x       
  59.            call  rotate_y
  60.            call  rotate_z
  61.            
  62.           
  63.  
  64.            call transform
  65.            
  66.            
  67.  
  68.            mov [ds:color],1         ; Objekt auf Seite 2 darstellen
  69.            mov di,offset _2dpoints
  70.            call draw_obj
  71.            
  72.            
  73.  
  74.            setpage 800ch           ; Seite 2 an
  75.            
  76.            mov dx,03dah
  77. wb1:       in al,dx
  78.            test al,8
  79.            jne wb1
  80. wb2:       in al,dx
  81.            test al,8
  82.            je wb2
  83.  
  84.            mov ax,0a000h
  85.            mov es,ax
  86.            assume es:0a000h
  87.            
  88.            mov cx,32000/4        ; Objekt auf Seite 1 löschen
  89.            xor si,si
  90.            xor eax,eax
  91. del_p1:    mov [es:si],eax
  92.            add si,4
  93.            dec cx
  94.            jnz del_p1
  95.            
  96.            
  97.  
  98.            call get_oldpos         ; Positionen von Seite 2 retten
  99.            
  100.            
  101.           
  102.           ;add [ds:xw],2
  103.           ; add [ds:yw],2
  104.           ; add [ds:zw],2
  105.            
  106.            call rotate_x        
  107.            call rotate_y
  108.            call rotate_z
  109.            
  110.            call transform
  111.            
  112.            mov [ds:color],1        ; Objekt auf Seite 1 darstellen
  113.            mov di,offset _2dpoints
  114.            call draw_obj
  115.            
  116.            setpage 000ch           ; Seite 1 an
  117.        
  118.            mov dx,03dah
  119. wb3:       in al,dx
  120.            test al,8
  121.            jne wb3
  122. wb4:       in al,dx
  123.            test al,8
  124.            je wb4
  125.  
  126.            mov ax,0a800h
  127.            mov es,ax
  128.            assume es:0a800h
  129.            
  130.            mov cx,32000/4
  131.            xor si,si
  132.            xor eax,eax
  133. del_p2:    mov [es:si],eax
  134.            add si,4
  135.            dec cx
  136.            jnz del_p2
  137.            
  138.            call get_oldpos         ; Positionen von Seite 1 retten
  139.            
  140.            add [ds:xw],2        ; Neue Winkel berechnen
  141.            add [ds:yw],4
  142.            add [ds:zw],2
  143.            
  144. warte:     in al,60h            ; Auf 'ESCAPE'-Taste warten
  145.            cmp al,01
  146.            jne main
  147.  
  148.            
  149. exit:      mov ax,0003h
  150.            int 10h
  151.            mov ax,4c00h
  152.            int 21h
  153.  
  154. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  155. ; ROTATIONS-ROUTINE / dreht die 3d-koordinaten in x,y und z-richtung
  156. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  157.  
  158. proc  rotate_x    NEAR
  159.      
  160.      mov   si,offset xpos
  161.      mov   di,offset _3dpoints
  162.      mov   cx,points
  163.  
  164. rotx_it:
  165.      push  cx
  166.      
  167.      mov   ax,[ds:zw]       
  168.      call  cosinus
  169.      imul  [word ds:si]
  170.      mov   cx,dx
  171.      mov   ax,[ds:zw] 
  172.      call  sinus
  173.      imul  [word ds:si+2*points]
  174.      sub   dx,cx
  175.      sal   dx,1
  176.      sal   dx,1
  177.      mov   [ds:di],dx  
  178.  
  179.      mov   ax,[ds:zw]       
  180.      call  sinus
  181.      imul  [word ds:si]
  182.      mov   cx,dx
  183.      mov   ax,[ds:zw] 
  184.      call  cosinus
  185.      imul  [word ds:si+2*points]
  186.      add   dx,cx
  187.      sal   dx,1
  188.      sal   dx,1
  189.      mov   [ds:di+2*points],dx                
  190.       
  191.      pop cx
  192.      add si,2
  193.      add di,2
  194.      dec cx
  195.      jnz rotx_it
  196.      ret
  197.  
  198. endp  rotate_x
  199.  
  200. proc  rotate_y    NEAR
  201.  
  202.      mov cx,points
  203.      mov si,offset xpos
  204.      mov di,offset _3dpoints
  205.  
  206. roty_it:     
  207.      push cx
  208.  
  209.      mov   ax,[ds:yw]       
  210.      call  cosinus
  211.      imul  [word ds:si]
  212.      mov   cx,dx
  213.      mov   ax,[ds:yw] 
  214.      call  sinus
  215.      imul  [word ds:si+4*points]
  216.      sub   dx,cx
  217.      sal   dx,1
  218.      sal   dx,1
  219.      mov   [ds:di],dx  
  220.  
  221.      mov   ax,[ds:yw]       
  222.      call  sinus
  223.      imul  [word ds:si]
  224.      mov   cx,dx
  225.      mov   ax,[ds:yw] 
  226.      call  cosinus
  227.      imul  [word ds:si+4*points]
  228.      add   dx,cx
  229.      sal   dx,1
  230.      sal   dx,1
  231.      mov   [ds:di+4*points],dx                
  232.       
  233.      pop cx
  234.      add si,2
  235.      add di,2
  236.      dec cx
  237.      jnz roty_it
  238.      ret
  239.  
  240. endp  rotate_y
  241.  
  242. proc  rotate_z    NEAR
  243.  
  244.      mov cx,points
  245.      mov si,offset xpos
  246.      mov di,offset _3dpoints
  247.  
  248. rotz_it:
  249.      
  250.      push cx
  251.  
  252.      mov   ax,[ds:xw]       
  253.      call  cosinus
  254.      imul  [word ds:si+2*points]
  255.      mov   cx,dx
  256.      mov   ax,[ds:xw] 
  257.      call  sinus
  258.      imul  [word ds:di+4*points]
  259.      sub   dx,cx
  260.      sal   dx,1
  261.      sal   dx,1
  262.      mov   [ds:di+2*points],dx  
  263.  
  264.      mov   ax,[ds:xw]       
  265.      call  sinus
  266.      imul  [word ds:si+2*points]
  267.      mov   cx,dx
  268.      mov   ax,[ds:xw] 
  269.      call  cosinus
  270.      imul  [word ds:di+4*points]
  271.      add   dx,cx
  272.      sal   dx,1
  273.      sal   dx,1
  274.      mov   [ds:di+4*points],dx                
  275.      
  276.      pop   cx
  277.      add si,2
  278.      add di,2
  279.      dec cx
  280.      jnz rotz_it
  281.      ret
  282.  
  283. endp  rotate_z
  284.  
  285. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  286. ; DRAW-OBJECT / zeichnet das object bestehend aus den 2d-koordinaten
  287. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  288.  
  289. proc  draw_obj    NEAR
  290.      
  291.      mov dx,03c4h
  292.      mov ax,0102h
  293.      out dx,ax
  294.      
  295.      mov   si,offset lines
  296.      mov   cx,areas
  297.  
  298. Draw_Bonds:
  299.      
  300.      push  cx
  301.      xor   bh,bh
  302.      mov   bl,[ds:si]    
  303.      shl   bl,1
  304.      mov   ax,[ds:di+bx]        
  305.      mov   cx,[ds:di+2*points+bx] 
  306.      mov   [ds:x1],ax
  307.      mov   [ds:y1],cx
  308.      inc   si
  309.      mov   bl,[ds:si]
  310.      shl   bl,1
  311.      mov   ax,[ds:di+bx]        
  312.      mov   cx,[ds:di+2*points+bx]  
  313.      mov   [ds:x2],ax
  314.      mov   [ds:y2],cx
  315.      push  si
  316.      push  di
  317.      call  drawline
  318.      pop   di
  319.      pop   si
  320.      inc   si
  321.      pop   cx
  322.      dec cx
  323.      jnz  Draw_Bonds
  324.      ret
  325.  
  326. endp  draw_obj 
  327.  
  328. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  329. ; TRANSFORMATION-ROUTINE / rechnet die 3d-koord. in 2d koord. um
  330. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  331.  
  332. proc  transform     NEAR
  333.      
  334.          mov   cx,points
  335.          mov   di,offset _2dpoints
  336.          mov   si,offset _3dpoints
  337.  
  338. trans_it:mov   bx,[ds:si+4*points] 
  339.          sub   bx,[ds:dist]
  340.      
  341.          mov   ax,[ds:dist]
  342.          imul  [word ds:si]
  343.          idiv  bx            
  344.          sar   ax,1
  345.          sar   ax,1
  346.          sar   ax,1
  347.          sar   ax,1
  348.          add   ax,[ds:x_add]
  349.          mov   [ds:di],ax      
  350.      
  351.          mov   ax,[ds:dist]
  352.          imul  [word ds:si+2*points]
  353.          idiv  bx
  354.          sar   ax,1
  355.          sar   ax,1
  356.          sar   ax,1
  357.          sar   ax,1
  358.          add   ax,[ds:y_add]
  359.          mov   [ds:di+2*points],ax 
  360.      
  361.          add si,2
  362.          add di,2
  363.          dec cx
  364.          jnz trans_it
  365.          ret
  366.  
  367. endp  transform 
  368.  
  369. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  370. ; COSINUS-ROUTINE
  371. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  372.  
  373. proc  cosinus     NEAR
  374.  
  375.      add   ax,64
  376.  
  377.      push  bx
  378.      push  cx
  379.      push  si
  380.      
  381.      mov   bx,ax
  382.      shl   ax,1
  383.      and   ax,0ffh       
  384.      mov   si,offset sinustable
  385.      add   si,ax
  386.      mov   ax,[ds:si]     
  387.      clc
  388.      shl   bl,1         
  389.      jae   cos_pos
  390.      neg   ax            
  391. cos_pos:
  392.      pop   si
  393.      pop   cx
  394.      pop   bx
  395.      ret
  396.  
  397. endp  cosinus
  398.  
  399. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  400. ; SINUS-ROUTINE
  401. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  402.  
  403. proc  sinus    NEAR
  404.  
  405.      push  bx
  406.      push  cx
  407.      push  si
  408.      
  409.      mov   bx,ax
  410.      shl   ax,1
  411.      and   ax,0ffh       
  412.      mov   si,offset sinustable
  413.      add   si,ax
  414.      mov   ax,[ds:si]     
  415.      clc
  416.      shl   bl,1         
  417.      jae   sin_pos
  418.      neg   ax            
  419. sin_pos:
  420.      pop   si
  421.      pop   cx
  422.      pop   bx
  423.      ret
  424.  
  425. endp  sinus
  426.  
  427. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  428. ; DRAWLINE-ROUTINE / zieht eine linie von x1,y1 nach x2,y2 mit farbe col
  429. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  430.  
  431. proc  drawline   NEAR
  432.      
  433.      mov   ax,[ds:x1]
  434.      cmp   ax,[ds:x2]
  435.      jz    no_xadd
  436.      jmp   draw_it
  437.  
  438. no_xadd:
  439.      
  440.      mov   ax,[ds:y1]
  441.      cmp   ax,[ds:y2]
  442.      jnz   draw_it
  443.      
  444.      mov ax,[ds:x1]
  445.      mov bx,[ds:y1]
  446.      jmp   stop_line
  447.  
  448. draw_it:
  449.      
  450.      push  bp
  451.      mov   ax,[ds:x1]
  452.      mov   bx,[ds:y1]
  453.      push  ax
  454.      push  bx
  455.      mov   bx,4340h
  456.      mov   cx,[ds:x2]
  457.      sub   cx,ax
  458.      jge   deltax_1
  459.      mov   bl,48h
  460.      neg   cx
  461.  
  462. deltax_1:
  463.      
  464.      mov   dx,[ds:y2]
  465.      pop   si
  466.      push  si
  467.      sub   dx,si
  468.      jge   deltay_1
  469.      mov   bh,4bh
  470.      neg   dx
  471.  
  472. deltay_1:
  473.  
  474.      mov   si,offset line_add
  475.      mov   [word cs:si],bx
  476.      cmp   cx,dx
  477.      jge   deltax_2
  478.      mov   bl,90h
  479.      xchg  cx,dx
  480.      jmp   achse3
  481.  
  482. deltax_2:
  483.      
  484.      mov   bh,90h
  485.  
  486. achse3:
  487.      
  488.      mov   si,offset line_sub
  489.      mov   [word cs:si],bx
  490.      shl   dx,1
  491.      mov   bp,dx
  492.      sub   dx,cx
  493.      mov   di,dx
  494.      sub   dx,cx
  495.      pop   bx
  496.      pop   ax
  497.  
  498. line_loop:
  499.      
  500.      push  di
  501.      push  ax
  502.      push  dx
  503.      push  bx
  504.      push  cx
  505.      
  506.      push ax         ;set a pixel in a 16 color grafix-mode
  507.      mov ax,80
  508.      imul bx
  509.      mov si,ax
  510.      pop cx
  511.      mov ax,cx
  512.      shr ax,3
  513.      add si,ax
  514.      
  515.      and cl,7
  516.      xor cl,7
  517.      mov ah,1
  518.      shl ah,cl
  519.      
  520.      mov al,[es:si]
  521.      or al,ah
  522.      mov [es:si],al
  523.      
  524.      pop   cx
  525.      pop   bx
  526.      pop   dx
  527.      pop   ax
  528.      pop   di
  529.      cmp   di,0
  530.      jge   line_add
  531.  
  532. line_sub:
  533.      
  534.      inc   ax
  535.      inc   bx
  536.      add   di,bp
  537.      loop  line_loop
  538.      jmp   end_line
  539.  
  540. line_add:
  541.      
  542.      inc   ax
  543.      inc   bx
  544.      add   di,dx
  545.      loop  line_loop
  546.  
  547. end_line:
  548.      
  549.      pop     bp
  550.  
  551. stop_line:
  552.      
  553.      ret
  554.  
  555. endp  drawline 
  556.  
  557.  
  558.  
  559. proc  get_oldpos  NEAR
  560.  
  561.          mov cx,2*points
  562.  
  563.          mov si,offset _2dpoints
  564.          mov di,offset old2d
  565.  
  566. old_loop:mov ax,[ds:si]
  567.          mov [ds:di],ax
  568.          add si,2
  569.          add di,2
  570.          dec cx
  571.          jnz old_loop
  572.          
  573.          ret
  574.  
  575. endp  get_oldpos
  576.  
  577.  
  578. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  579. ; SET 320*400 Graphics-mode (based on 4 bitplane-splitting) 
  580. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  581.  
  582. proc  set320400  NEAR
  583.  
  584.               mov ax,0013h      
  585.               int 10h
  586.  
  587.               mov dx,03c4h
  588.               mov al,04h
  589.               out dx,al
  590.               inc dx
  591.               in al,dx
  592.               and al,11110111b
  593.               out dx,al
  594.               dec dx
  595.               
  596.               mov ax,0f02h
  597.               out dx,ax
  598.  
  599.               mov dx,03d4h
  600.               mov al,14h
  601.               out dx,al
  602.               inc dx
  603.               in al,dx
  604.               and al,10111111b
  605.               out dx,al
  606.               dec dx
  607.               mov al,17h
  608.               out dx,al
  609.               inc dx
  610.               in al,dx
  611.               or al,01000000b
  612.               out dx,al
  613.  
  614.               mov dx,03d4h
  615.               mov al,09h
  616.               out dx,al
  617.               inc dx
  618.               in al,dx
  619.               and al,01110000b
  620.               out dx,al
  621.               
  622.               mov dx,03c4h
  623.               mov ax,0f02h
  624.               out dx,ax
  625.  
  626.               mov ax,0a000h
  627.               mov es,ax
  628.               assume es:0a000h
  629.               
  630.               mov cx,64000      ; alle bitplanes auf beiden grafikseiten
  631.               xor di,di         ; löschen...
  632.               xor eax,eax
  633.               cld
  634.               rep stosd
  635.  
  636.               ret
  637.  
  638. endp  set320400
  639.  
  640. proc  set640400  NEAR
  641.  
  642.               mov ax,000eh
  643.               int 10h
  644.  
  645.               mov dx,03d4h
  646.               mov al,09h
  647.               out dx,al
  648.               inc dx
  649.               in al,dx
  650.               and al,01111111b
  651.               out dx,al
  652.  
  653.               ret
  654.  
  655. endp  set640400
  656.  
  657. ends  coding
  658.  
  659. segment  data1
  660.  
  661. ;
  662. ; OBJEKT DATEN
  663. ;
  664.  
  665. xpos   dw -500,500,-500,500
  666.        dw -500,500,-500,500
  667.        dw -1000,1000,0,0
  668.        dw 0,0
  669.  
  670. ypos   dw -500,-500,500,500
  671.        dw -500,-500,500,500
  672.        dw 0,0,-1000,1000
  673.        dw 0,0
  674.  
  675. zpos   dw -500,-500,-500,-500
  676.        dw 500,500,500,500
  677.        dw 0,0,0,0
  678.        dw -1000,1000
  679. ;
  680. ; BINDUNGSLISTE FÜR DIE OBJEKT-PUNKTE
  681. ;
  682.  
  683. lines db 0,1        
  684.       db 0,2
  685.       db 1,3
  686.       db 2,3
  687.  
  688.       db 4,5
  689.       db 4,6
  690.       db 6,7
  691.       db 5,7
  692.  
  693.       db 0,4
  694.       db 5,1
  695.       db 2,6
  696.       db 7,3
  697.  
  698.       db 8,0
  699.       db 8,4
  700.       db 8,2
  701.       db 8,6
  702.  
  703.       db 9,3
  704.       db 9,7
  705.       db 9,1
  706.       db 9,5
  707.  
  708.       db 10,0
  709.       db 10,4
  710.       db 10,1
  711.       db 10,5
  712.  
  713.       db 11,2
  714.       db 11,6
  715.       db 11,7
  716.       db 11,3
  717.  
  718.       db 12,2
  719.       db 12,0
  720.       db 12,3
  721.       db 12,1
  722.  
  723.       db 13,4
  724.       db 13,5
  725.       db 13,6
  726.       db 13,7
  727.  
  728.  
  729.  
  730. ;
  731. ; DISTANZ VOM AUGE DES BETRACHTERS IN DEN 3D-RAUM
  732. ;
  733.  
  734. dist  dw 2000
  735.  
  736. ;
  737. ; SINUSTABELLE MIT 128 WERTEN
  738. ;
  739.  
  740. sinustable dw 0000h,0192h,0324h,04b5h,0646h
  741.            dw 07d6h,0964h,0af1h,0c7ch,0e06h,0f8dh
  742.            dw 1112h,1294h,1413h,1590h,1709h,187eh
  743.            dw 19efh,1b5dh,1cc6h,1e2bh,1f8ch,20e7h
  744.            dw 223dh,238eh,24dah,2620h,2760h,289ah
  745.            dw 29ceh,2afbh,2c21h,2d41h,2e5ah,2f6ch
  746.            dw 3076h,3179h,3274h,3368h,3453h,3537h
  747.            dw 3612h,36e5h,37b0h,3871h,392bh,39dbh
  748.            dw 3a82h,3b21h,3bb6h,3c42h,3cc5h,3d3fh
  749.            dw 3dafh,3e15h,3e72h,3ec5h,3f0fh,3f4fh
  750.            dw 3f85h,3fb1h,3fd4h,3fech,3ffbh,4000h
  751.            dw 3ffbh,3fech,3fd4h,3fb1h,3f85h,3f4fh
  752.            dw 3f0fh,3ec5h,3e72h,3e15h,3dafh,3d3fh
  753.            dw 3cc5h,3c42h,3bb6h,3b21h,3a82h,39dbh
  754.            dw 392bh,3871h,37b0h,36e5h,3612h,3537h
  755.            dw 3453h,3368h,3274h,3179h,3076h,2f6ch
  756.            dw 2e5ah,2d41h,2c21h,2afbh,29ceh,289ah
  757.            dw 2760h,2620h,24dah,238eh,223dh,20e7h
  758.            dw 1f8ch,1e2bh,1cc6h,1b5dh,19efh,187eh
  759.            dw 1709h,1590h,1413h,1294h,1112h,0f8dh
  760.            dw 0e06h,0c7ch,0af1h,0964h,07d6h,0646h
  761.            dw 04b5h,0324h,0192h
  762.   
  763. ;
  764. ; LINIEN-PUNKTE FÜR draw_obj-ROUTINE
  765. ;
  766.  
  767. x1      dw 0
  768. x2      dw 0
  769. y1      dw 0
  770. y2      dw 0
  771.  
  772. ;
  773. ; WINKEL FÜR DIE DREHUNGEN IN X,Y UND Z-RICHTUNG
  774. ;
  775.  
  776. xw      dw 0     
  777. yw      dw 0
  778. zw      dw 0
  779.  
  780. ;
  781. ; PUFFER FÜR ROTIERTE 3D-KOORDINATEN
  782. ;
  783.  
  784. _3dpoints    dw 3*points DUP (1) ; gedrehte Koord.
  785.  
  786. ;
  787. ; PUFFER FÜR UMGERECHNETE 2D-KOORDINATEN
  788. ;
  789.  
  790. _2dpoints   dw 2*points DUP (1) ; 2D-Koordinaten
  791.      
  792. ;
  793. ; PUFFER FÜR ALTE 2D-KOORDINATEN
  794. ;
  795.  
  796. old2d       dw 2*points dup (0) ; Alte 2D-Koordinaten
  797.  
  798. ;
  799. ; 2D-POINTER FÜR POSITIONIERUNG AUF BILDSCHIRM
  800. ;
  801.  
  802. x_add    dw 320
  803. y_add    dw 240
  804.  
  805. color    db 1
  806.  
  807. ends  data1
  808.  
  809. end start
  810.